
<%@ page import="java.util.Vector,
                                    com.epro.standard.frontend.util.FileInfoUtil,                                  
                                    com.softplus.carrefour.hd.CFHDSystem,
                                    com.softplus.carrefour.CFException,
                                    
                                                                          
                                    com.softplus.carrefour.hd.bltier.report.ICaseReportViewer,
                                     com.softplus.carrefour.hd.bltier.report.CCaseReportManage,                                   
                                    com.softplus.carrefour.hd.bltier.entity.CfhdCaseHead,
                                                                        
                                    com.epro.standard.frontend.datasetup.MessageManager,
                                    com.softplus.carrefour.hd.bltier.entity.Country,
                                    com.softplus.carrefour.hd.bltier.entity.UserAccount,
                                    com.softplus.carrefour.hd.bltier.admin.UserLevelManage,
                                    
                                    com.epro.standard.frontend.util.ShowData,
                                    com.softplus.carrefour.hd.bltier.admin.CountryManage,
                                    com.softplus.carrefour.hd.bltier.admin.ICountryViewer,
                                    java.text.SimpleDateFormat,
                                    java.util.Locale,
                                    java.util.Date,               
  								    com.softplus.carrefour.hd.bltier.util.DateUtil,
                                     com.softplus.carrefour.hd.bltier.entity.UserLevel,
                                     com.softplus.carrefour.hd.bltier.report.CaseReportVO
                                      " %>
  <%@ include file="../include/eproFileInfo.jsp" %>
   <%@include file="../include/spUserVOInclude.jsp"%>
  <%
  System.out.println("+++++++++++++++++++++++++++++++++Begin CFHDRPRP02.jsp+++++++++++++++++++++++++++");
  //========= Variable of System=========
  	ShowData showData 	= new ShowData();
  	        //Current Date
        Date d = new Date();
        SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy", Locale.US);    
         
 	UserAccount					userVO2					=  (UserAccount) session.getAttribute("userVO");//"kunlaporn_c";
		String								userID					= userVO2.getUserId();//request.getParameter("uid");
       
 	
  //==========1 Set Layout=============
  	String[] 	dataWidth 					=	{"180","210","50","105","105","20"}; // ???????????? =  (masterWidth+50)
String sumdataWidth="550";
 //==========2 Receive Parameter============= 	
  String   countrySelected =  request.getParameter("country")!=null?request.getParameter("country"):"ALL";
  String   fromUserLevel =  request.getParameter("fromUserLevel")!=null?request.getParameter("fromUserLevel"):"ALL";
  String   toUserLevel =  request.getParameter("toUserLevel")!=null?request.getParameter("toUserLevel"):"ALL";
  
  
  
  String   P1         =  request.getParameter("P1")!=null?request.getParameter("P1"):"false";
  String   P2         =  request.getParameter("P2")!=null?request.getParameter("P2"):"false";
  String   P3         =  request.getParameter("P3")!=null?request.getParameter("P3"):"false";
  String   P4         =  request.getParameter("P4")!=null?request.getParameter("P4"):"false";
    
 
 String From     =  request.getParameter("From")!=null?request.getParameter("From"):"01/01/2000''";
  String To     =  request.getParameter("To")!=null?request.getParameter("To"):"'01/01/2100'";

      System.out.println("*****noom****************countrySelected="+countrySelected);          
      System.out.println("*****noom****************fromUserLevel="+fromUserLevel);          
       System.out.println("*****noom****************toUserLevel="+toUserLevel);          
      System.out.println("*****noom****************P1="+P1);          
     System.out.println("*****noom****************P2="+P2);          
      System.out.println("*****noom****************P3="+P3);          
       System.out.println("*****noom****************From="+From);          
      System.out.println("*****noom****************To="+To);          
 
   
   int sumGrandTotal=0;  
//============== 3 define object ===================
 	ICaseReportViewer		reportManage	=	(CCaseReportManage)CFHDSystem.getControlClass("CASE_REPORT");
    ICountryViewer  countryManage  = ( ICountryViewer)CFHDSystem.getControlClass("COUNTRY");
 
   //==============================Vector====================================================    
    
    String  countryName= "";
    Vector countryVector=null;
       if(countrySelected.equals("ALL")){
         countryName= "All";
         countryVector=  countryManage.getAllCountry();       // getAllCountry is  Entity of Country
System.out.println("*****countryManage.getAllCountry().size()===****************"+countryVector.size());
         }
      else{  countryName=   countryManage.getCountry(countrySelected).getCountryName();
                countryVector=new Vector();   
                countryVector.add(countryManage.getCountry(countrySelected)); //so I must add  countryVector Entity of Country   
          }
         
 Vector vectorFrom=null;
 Vector vectorTo=null;     
 Vector vectorFromName=null;
 Vector vectorToName=null;     
 String fromname=UserLevel.getLevelName(fromUserLevel);
  String toname=UserLevel.getLevelName(toUserLevel);
         if(fromUserLevel.equals("ALL")){
          fromname="All";
          toname="All";
          vectorFrom=new Vector();
          vectorFrom.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
          vectorFrom.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
          vectorFrom.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
          vectorFrom.add(UserLevel.LEVEL_3_AMS_BANGKOK);
          vectorFrom.add(UserLevel.PRODUCTION_STAFF);
/*          
          vectorFromName=new Vector();
         vectorFrom.add(UserLevel.getLevelName(UserLevel.LEVEL_1_COUNTRY_HELPDESK));
         vectorFrom.add(UserLevel.getLevelName(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE));
         vectorFrom.add(UserLevel.getLevelName(UserLevel.LEVEL_2_AMS_ZONE_ASIA));
         vectorFrom.add(UserLevel.getLevelName(UserLevel.LEVEL_3_AMS_BANGKOK));
         vectorFrom.add(UserLevel.getLevelName(UserLevel.PRODUCTION_STAFF));
  */        
           vectorTo=new Vector();
          vectorTo.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
          vectorTo.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
          vectorTo.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
          vectorTo.add(UserLevel.LEVEL_3_AMS_BANGKOK);
          vectorTo.add(UserLevel.PRODUCTION_STAFF);
        
           
 } else if(fromUserLevel.equals(UserLevel.LEVEL_1_COUNTRY_HELPDESK)){ //From=L1C
          vectorFrom=new Vector();
          vectorFrom.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
             if(toUserLevel.equals(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_2_AMS_ZONE_ASIA)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_3_AMS_BANGKOK)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_3_AMS_BANGKOK);
             }
              if(toUserLevel.equals(UserLevel.PRODUCTION_STAFF)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.PRODUCTION_STAFF);
             }
              if(toUserLevel.equals("ALL")){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
                vectorTo.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
                vectorTo.add(UserLevel.LEVEL_3_AMS_BANGKOK);
                vectorTo.add(UserLevel.PRODUCTION_STAFF);
                toname="All";
                
             }
 
}else if(fromUserLevel.equals(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE)){ //From=L2C
          vectorFrom=new Vector();
          vectorFrom.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
             if(toUserLevel.equals(UserLevel.LEVEL_1_COUNTRY_HELPDESK)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_2_AMS_ZONE_ASIA)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_3_AMS_BANGKOK)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_3_AMS_BANGKOK);
             }
              if(toUserLevel.equals(UserLevel.PRODUCTION_STAFF)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.PRODUCTION_STAFF);
             }
              if(toUserLevel.equals("ALL")){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
                vectorTo.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
                vectorTo.add(UserLevel.LEVEL_3_AMS_BANGKOK);
                vectorTo.add(UserLevel.PRODUCTION_STAFF);
                toname="All";
             }
 
}else if(fromUserLevel.equals(UserLevel.LEVEL_2_AMS_ZONE_ASIA)){ //From=L2Z
          vectorFrom=new Vector();
          vectorFrom.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
             if(toUserLevel.equals(UserLevel.LEVEL_1_COUNTRY_HELPDESK)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_3_AMS_BANGKOK)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_3_AMS_BANGKOK);
             }
              if(toUserLevel.equals(UserLevel.PRODUCTION_STAFF)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.PRODUCTION_STAFF);
             }
              if(toUserLevel.equals("ALL")){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
                vectorTo.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
                vectorTo.add(UserLevel.LEVEL_3_AMS_BANGKOK);
                vectorTo.add(UserLevel.PRODUCTION_STAFF);
                toname="All";
             }
 
}else if(fromUserLevel.equals(UserLevel.LEVEL_3_AMS_BANGKOK)){ //From=BKK
          vectorFrom=new Vector();
          vectorFrom.add(UserLevel.LEVEL_3_AMS_BANGKOK);
             if(toUserLevel.equals(UserLevel.LEVEL_1_COUNTRY_HELPDESK)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_2_AMS_ZONE_ASIA)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
             }
              if(toUserLevel.equals(UserLevel.PRODUCTION_STAFF)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.PRODUCTION_STAFF);
             }
              if(toUserLevel.equals("ALL")){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
                vectorTo.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
                vectorTo.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
                vectorTo.add(UserLevel.PRODUCTION_STAFF);
                toname="All";
             }
 
}else if(fromUserLevel.equals(UserLevel.PRODUCTION_STAFF)){ //From=PROD
          vectorFrom=new Vector();
          vectorFrom.add(UserLevel.PRODUCTION_STAFF);
             if(toUserLevel.equals(UserLevel.LEVEL_1_COUNTRY_HELPDESK)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_2_AMS_ZONE_ASIA)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
             }
              if(toUserLevel.equals(UserLevel.LEVEL_3_AMS_BANGKOK)){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_3_AMS_BANGKOK);
             }
              if(toUserLevel.equals("ALL")){
                vectorTo=new Vector();
                vectorTo.add(UserLevel.LEVEL_1_COUNTRY_HELPDESK);
                vectorTo.add(UserLevel.LEVEL_2_COUNTRY_APPLICATION_TEAM_BACK_OFFICE);
                vectorTo.add(UserLevel.LEVEL_2_AMS_ZONE_ASIA);
                vectorTo.add(UserLevel.LEVEL_3_AMS_BANGKOK);
                 toname="All";
             }
 
}
     
     
 //=======================Case Type======================
                 String caseType = "";
                String ShowCase = "";
                if(P1.equals("true"))
                {
                         ShowCase = ShowCase + "User Question (P1)" + ",";
                          caseType = caseType + "'" +CfhdCaseHead.CASE_USER_QUESTION+"'"+ ",";  
                }
                if(P2.equals("true"))
                {
                        ShowCase = ShowCase + "Problem Report (P2)" + ",";
                         caseType = caseType + "'" +CfhdCaseHead.CASE_PROBLEM_REPORT+"'"+ ",";  
                }
                if(P3.equals("true"))
                {
                         ShowCase = ShowCase + "Change Request (P3)" + ",";
                         caseType = caseType + "'" +CfhdCaseHead.CASE_CHANGE_REQUEST+"'"+ ",";  
                }
                if(P4.equals("true"))
                {
                         ShowCase = ShowCase + "Service Request (P4)" + ",";
                         caseType = caseType + "'" +CfhdCaseHead.CASE_SERVICE_REQUEST+"'"+ ",";  
                }
                if( (P1.equals("true")) || (P2.equals("true")) || (P3.equals("true"))|| (P4.equals("true")))
                { 
                 ShowCase = ShowCase.substring(0,ShowCase.length()-1);
                caseType = caseType.substring(0,caseType.length()-1);
                }
     System.out.println("*****noom****************ShowCase="+ShowCase);
     System.out.println("*****noom****************caseType="+caseType);
         
%>



<html>
  <head>
    <title>List of Cases by Type and Status</title>
          <script src="../script/spToolbar.js" type="text/javascript"></script>
          <link rel="stylesheet" href="../theme/CFHDReportTheme.css" />
          <link rel="stylesheet" href="../theme/defaultTheme.css" />
          <link rel="stylesheet" href="../theme/CFRLTheme.css" />

</head>
  <body >

 	&nbsp;&nbsp;&nbsp;<a href="CFHDRPMT02.jsp">
		<img alt="Back to view all cases" src="../images/icon/toolbar/nBackToMenu.gif" width="21" height="21" border="0" onmouseout="imgOut(this)" onmouseover="imgOver(this)" /></a>

  <table width="750"  border="0" cellspacing="0" cellpadding="0" style="margin-left:3px;" bordercolor="green">
  <tr>
    <td align="center">
     <span class="Header"> E-Helpdesk</span>
         <span class="Header">List of Automatic Escalated Cases by Date</span>
     </td>
  </tr>
  <!-----------------------------------Title----------------------------------------------->
<tr>
<td>
   <%
     %>
      <span class="viewCaseHeader"  style="text-align: right;"> Created Date : <%=new SimpleDateFormat("dd/MM/yyyy HH:mm").format(DateUtil.getLocalDate(userID))%> </span>
     <span class="viewCaseHeader"> From : <%=fromname%> </span>
     <span class="viewCaseHeader"> TO : <%=toname%> </span>
     <span class="viewCaseHeader"> Country : <%=countryName%> </span>
      <span class="viewCaseHeader"> Case Type  :   <%=ShowCase%></span>
        <span class="viewCaseHeader"> Open Case Date From : <%=From%> To :  <%=To%> </span>
 
</td>
</tr> 
 <!-----------------------------------Header Cloumn----------------------------------------------> 
 <tr>
 <td >

 									<div align="center" id="masterZone" style="overflow-x: auto; overflow-y: hidden;">
									<table style="display: block;" cellspacing="0" cellpadding="0" align="left" width="100%" bgcolor="darkorange" border="0" bordercolor="red">
									<tr> 
											<!--td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;" width="200<%//=dataWidth[0]%>">Case ID</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;" width="190<%//=dataWidth[1]%>">Subject</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center;   color: white;"      width="80<%//=dataWidth[2]%>">Open Case Date</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;" 	width="110<%//=dataWidth[3]%>">Submit Time (Local Time)</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;" 	width="105<%//=dataWidth[3]%>">Submit Time (Server Time)</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;"      width="40<%//=dataWidth[4]%>">Case Type</td-->
											<td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;" width="<%=dataWidth[0]%>">Case ID</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;" width="<%=dataWidth[1]%>">Subject</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center;   color: white;"      width="<%=dataWidth[2]%>">Open Case Date</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;" 	width="<%=dataWidth[3]%>">Submit Time (Local Time)</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;" 	width="<%=dataWidth[3]%>">Submit Time (Server Time)</td>
											<td bgcolor="darkorange" class="titleFont" style="text-align: center; color: white;"      width="<%=dataWidth[4]%>">Case Type</td>
									</tr>
									</table>
									</div>
  </td>
  </tr>
 <!----------------------------------- /Header Cloumn----------------------------------------------> 
   <tr >
    <td align="center">
    
    
    
    
    
    
    
    
    
    
    
        									<DIV id="ReportMasterDiv"    >
									<FORM name="ReportMasterForm" style="border-color: red;border: 1px; ">
    
<%

  
//===========================1111======================FOR==========================================================

   String          fromIdSelected        ="";
   String          toIdSelected        ="";
 String          countryIdSelected        ="";
      System.out.println("*****!!!!***********vectorFrom.size()="+vectorFrom.size());
      System.out.println("*****!!!!***********vectorTo.size()="+vectorTo.size());
      System.out.println("*****!!!!***********countryVector.size()="+countryVector.size());
        System.out.println("*****!!!!***********countryVector="+countryVector);
  
     for(int k=0;k<vectorFrom.size();k++){ //loop  From
     
           System.out.println("*****!!!!******k="+k);
     
                             fromIdSelected        =(String) vectorFrom.elementAt(k);
           System.out.println("*****!!!!***********fromIdSelected="+fromIdSelected);
                        for(int j=0;j<vectorTo.size();j++){ //loop  To
     //       if(fromUserLevel.equals("ALL")){
      //          if(k==j){break;}
      //      }
                        
                        System.out.println("*****!!!!**********j="+j);
             
                       toIdSelected        =(String) vectorTo.elementAt(j);
             System.out.println("*****!!!!***********toIdSelected="+toIdSelected);

    if( (! (fromIdSelected.equals(toIdSelected)) )&&(reportManage.isHasAutoEscalateCase(caseType,fromIdSelected,toIdSelected,format.parse(From),format.parse(To)))  ){ //
                  
   int sumTotalbyUserLevel=0;  
   
%>    

<table border="0" bordercolor="pink" cellpadding="0" cellspacing="0">
<tr>
  <td>
     <span class="viewCaseHeader"> From : <%=UserLevel.getLevelName(fromIdSelected)%>  To : <%=UserLevel.getLevelName(toIdSelected)%></span>
   </td>  
</tr> 


 <tr>
  <td>
  
  
  <%
  //=========222==========================Country===============================================
                    for(int i=0;i<countryVector.size();i++){ //loop  Country
            System.out.println("*****!!!!********************i="+i);
                       
                Country       countrySelected2      =(Country) countryVector.elementAt(i);  //countryVector  is Entity of Country 
                                  countryIdSelected  =countrySelected2.getCountryId();
              System.out.println("*****!!!!**"  +i+"=************countryIdSelected="+countrySelected2.getCountryName());
     //     try{                
               Vector    dataVecEscalated =  reportManage.listAutoEscalateCase(countryIdSelected,caseType,fromIdSelected,toIdSelected,format.parse(From),format.parse(To));
    //            System.out.println("dataVecEscalated="+dataVecEscalated);
           System.out.println("dataVecEscalated.size()="+dataVecEscalated.size());
                              sumTotalbyUserLevel=sumTotalbyUserLevel+dataVecEscalated.size();
        
               if(dataVecEscalated.size()!=0){         
               
               System.out.println("dataVecEscalated.size()!=0");
   
  %>
  
  
  <table  border="0" cellpadding="0"  cellspacing="0" bordercolor="blue" width="730">
      <tr>  <td colspan="6" class="TotalByCaseTyephaveline"> <span> Country : <%=countrySelected2.getCountryName()%>  </span> </td>  </tr>
      
      
     <%   
     ///====================33333=============================

       for(int h=0;h<dataVecEscalated.size();h++){
               System.out.println(">>>>>>>>>>>>>>h="+h);
       
           CaseReportVO           caseReportEntity        =(CaseReportVO) dataVecEscalated.elementAt(h);
                 System.out.println(">>>>>>>>>>>>>>caseReportEntity.getCaseId()="+caseReportEntity.getCaseId());
   
        %>
        <tr>
           <td class="resultFont" width="<%=dataWidth[0]%>"><%=showData.CheckNull(caseReportEntity.getCaseId())%></td>
           <% System.out.println(">>>>>>>>>>>>aaaaaaa");%>
           <td class="resultFont" width="<%=dataWidth[1]%>"><%=showData.CheckNull(caseReportEntity.getSubject())%></td>
           <% System.out.println(">>>>>>>>>>>>bbbb==="+showData.CheckNull(caseReportEntity.getSubject()));%>
           <td class="resultFont" width="<%=dataWidth[2]%>"><%=showData.CheckNull(caseReportEntity.getOpenDate(),"dd/MM/yy")%></td>
            <% System.out.println(">>>>>>>>>>>>ccccccc");%>
          <td class="resultFont" width="<%=dataWidth[3]%>"><%=showData.CheckNull(caseReportEntity.getLocalSubmitTime(),"dd/MM/yy HH:mm")%></td>
           <% System.out.println(">>>>>>>>>>>>ddddddd");%>
          <td class="resultFont"  width="<%=dataWidth[4]%>"><%=showData.CheckNull(caseReportEntity.getServerSubmitTime(),"dd/MM/yy HH:mm")%></td>
           <% System.out.println(">>>>>>>>>>>>eeeee");%>
           <td class="resultFont" width="<%=dataWidth[5]%>"><%= showData.CheckNull(caseReportEntity.getCaseType())%></td>
          <% System.out.println(">>>>>>>>>>>>ffffffff");%>
     </tr>         


         <% 
         System.out.println(">>>>>>>>>>>>ggggggggg");
                         
         
        ///====================444444============================
         
        }//end for
         %>     
         
         
         
       <tr> <td colspan="2"style="border-top: 2px solid #FF8C00;  ">&nbsp;</td>
        <td colspan="4"style="border-top: 2px solid #FF8C00; text-align: right;" align="right">  
 
                 <table border="0" align="right" width="250"  cellpadding="0" cellspacing="0" style="margin-right: 10px;">
                 <tr > <td nowrap="nowrap" width="150" class="TotalByCaseTyephaveline">Total by Country</td>
                         <td nowrap="nowrap" width="80"  class="TotalByCaseTyephaveline" style="text-align: right;"><%=dataVecEscalated.size() %></td>
                         <td nowrap="nowrap" width="60" class="TotalByCaseTyephaveline"> Cases</td>
                 </tr>
                 </table>   

        </td>  </tr>
</table>
 
<% 
     ///====================55555============================
     } //end    if(dataVecEscalated.size()!=0){ 
  }// for(int i=0;i<countryVector.size();i++){ //loop  Country                 
%>
 
 
   <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
    </td>  
</tr> 

 <tr>
  <td >  
   <table border="0" cellpadding="0"  cellspacing="0" bordercolor="green" width="730">
            <tr> 
        		<td colspan="3"style="border-bottom: 3px solid black; text-align: right;" align="right">   
                 	<table border="0" align="right" width="250"  cellpadding="0" cellspacing="0" style="margin-right: 10px;">
                 		<tr> 
                 			<td nowrap="nowrap" width="150" class="TotalByCaseTyephavelineDoble" >Total by User Level </td>
                         	<td nowrap="nowrap" width="80"  class="TotalByCaseTyephavelineDoble" style="text-align: right;"><%=sumTotalbyUserLevel%></td>
                         	<td nowrap="nowrap" width="60" class="TotalByCaseTyephavelineDoble"> Cases</td> 
                 		</tr>
                 	</table>   
                 </td>  
           	</tr>
    </table>

      
    </td>  
</tr>



 <% 
            ///====================666666==========================

                         sumGrandTotal=sumGrandTotal+sumTotalbyUserLevel;
         }//end      if( (! (fromIdSelected.equals(toIdSelected)) )&&(reportManage.isHasAutoEscalateCase(caseType,fromIdSelected,toIdSelected,format.parse(From),format.parse(To)))  ){ //

   }//    for(int j=0;j<vectorTo.size();j++){ //loop  To
 } //     for(int k=0;k<vectorFrom.size();k++){ //loop  From

 %>




<tr>
  <td >  
    
     <table border="0" cellpadding="0"  cellspacing="0" bordercolor="green" width="730">
            <tr> 
        		<td colspan="3"style="border-bottom: 0px solid black; text-align: right;" align="right">   
                 	<table border="0" align="right" width="250"  cellpadding="0" cellspacing="0" style="margin-right: 10px;">
                 		<tr> 
                 			<td nowrap="nowrap" width="150" class="TotalByCaseTyephavelineDobleForGrandTotal" >Grand  Total  </td>
                         	<td nowrap="nowrap" width="80"  class="TotalByCaseTyephavelineDobleForGrandTotal" style="text-align: right;"><%=sumGrandTotal%></td>
                         	<td nowrap="nowrap" width="60" class="TotalByCaseTyephavelineDobleForGrandTotal"> Cases</td> 
                 		</tr>
                 	</table>   
                 </td>  
           	</tr>
    </table>
         
    </td>  
</tr> 

 </table>    

    
        </FORM>
    </DIV>
 
 
 
 
 
    
    </td>
  </tr>
   <!-----------------------------------END  DISPLAY TAG-----------------------------------------------> 
  
</table>
 <!-----------------------------------END  TABLE-----------------------------------------------> 
  

<script type="text/javascript" src="../script/criticalHilight.js"></script>

  </body>
</html>
